package net.jmchilton.spring.collect.commons.test;

import org.apache.commons.collections.Transformer;

/**
 * For Testing.
 * 
 * @author John Chilton
 *
 */
public class AddTransformer implements Transformer {
  private int amount;

  /**
   * Initialize amount to 1.
   */
  public AddTransformer() {
    this(1);
  }

  /**
   * @param amount Amount to add
   */
  public AddTransformer(final int amount) {
    this.amount = amount;
  }
  
  public Object transform(Object x) {
    System.out.println(x);
    return ((Integer) x) + amount;
  }

}
